#define _CRT_SECURE_NO_WARNINGS 1
#include<stdio.h>
#include<string.h>
int main()
{
	char ch1[100] = "\0";
	char ch2[100] = "\0";
	int i = 0;
	int j = 0;
	int k = 0;
	gets(ch1);
	gets(ch2);
	for (i = 0; i < strlen(ch1); i++)
	{
		for (j = 0; j < strlen(ch2); j++)
		{
			if (ch1[i] == ch2[j])
			{
				for (k = i;k < strlen(ch1);k++)
				{
					ch1[k] = ch1[k + 1];
				}
			}
		}
	}
	printf("%s", ch1);
	return 0;
}